<template>
    <div>
        <div>当前count的值：{{$store.state.count}}</div>
        <button @click="btnHandlert">-1</button>
        <button @click="btnHandlert2">-n</button>
        <!-- <button @click="btnHandlert3">-1 asy</button>
        <button @click="btnHandlert4">-n asy</button> -->
    </div>
    
</template>
<script>
import { mapState,mapMutations,mapActions } from 'vuex'
export default {
    data(){
        return{};
    },
   methods:{
    // ...mapActions(['subAsync','subNAsync']),
       btnHandlert(){
           this.$store.commit('sub');
       },
       btnHandlert2(){
           this.$store.commit('subN',3);
       },
      
      

   }
}
</script>

